import React, { FC } from 'react';
import theme from '../../../theme';

interface AccountIconProps {
  width?: string;
  color?: string;
}

const AccountIcon: FC<AccountIconProps> = ({ width, color }) => {
  const DEFAULT_WIDTH = '24';
  const DEFAULT_COLOR = theme.colors.general.textSecondary;

  return (
    <svg
      width={width || DEFAULT_WIDTH}
      fill={theme.colors.general[color] || DEFAULT_COLOR}
      viewBox="0 0 24 24"
      xmlns="http://www.w3.org/2000/svg"
    >
      <path d="M9 10c-2.757 0-5-2.243-5-5s2.243-5 5-5 5 2.243 5 5-2.243 5-5 5zm0-9C6.794 1 5 2.794 5 5s1.794 4 4 4 4-1.794 4-4-1.794-4-4-4zM8.5 21h-8a.5.5 0 01-.5-.5v-4C0 14.019 2.019 12 4.5 12h6a.5.5 0 010 1h-6C2.57 13 1 14.57 1 16.5V20h7.5a.5.5 0 010 1zM17 20c-1.378 0-2.5-1.122-2.5-2.5S15.622 15 17 15s2.5 1.122 2.5 2.5S18.378 20 17 20zm0-4c-.827 0-1.5.673-1.5 1.5S16.173 19 17 19s1.5-.673 1.5-1.5S17.827 16 17 16z" />
      <path d="M17.797 24h-1.595a.996.996 0 01-.995-.901l-.127-1.271a4.696 4.696 0 01-.865-.503l-1.168.527a.995.995 0 01-1.277-.412l-.797-1.381a.998.998 0 01.282-1.312l1.029-.74c-.02-.155-.034-.327-.034-.507s.014-.353.034-.507l-1.029-.74a.998.998 0 01-.282-1.312l.797-1.381a.996.996 0 011.277-.412l1.168.527c.273-.2.562-.368.865-.503l.127-1.271a.996.996 0 01.995-.9h1.595c.516 0 .944.387.995.901l.127 1.271c.304.135.593.304.865.503l1.168-.527a.998.998 0 011.277.412l.797 1.381a.998.998 0 01-.282 1.312l-1.029.74c.02.155.034.327.034.507s-.014.353-.034.507l1.029.74c.418.301.54.865.282 1.312l-.796 1.38a.996.996 0 01-1.277.412l-1.168-.527c-.273.2-.562.368-.865.503l-.128 1.272a.996.996 0 01-.995.9zm-3.512-3.755a.5.5 0 01.321.117c.339.284.714.501 1.113.647a.5.5 0 01.326.42L16.203 23h1.595l.157-1.571a.5.5 0 01.326-.42 3.745 3.745 0 001.113-.647.5.5 0 01.526-.072l1.444.652.797-1.381-1.278-.918a.503.503 0 01-.201-.493c.037-.211.067-.426.067-.648s-.03-.437-.067-.648a.502.502 0 01.201-.493l1.278-.918-.797-1.381-1.444.651a.501.501 0 01-.527-.072 3.687 3.687 0 00-1.113-.647.5.5 0 01-.326-.42L17.797 12h-1.595l-.157 1.571a.5.5 0 01-.326.42 3.745 3.745 0 00-1.113.647.497.497 0 01-.526.072l-1.444-.652-.797 1.381 1.278.918a.503.503 0 01.201.493c-.037.211-.067.426-.067.648s.03.437.067.648a.502.502 0 01-.201.493l-1.278.918.797 1.381 1.444-.651a.522.522 0 01.205-.042z" />
    </svg>
  );
};

export default AccountIcon;
